<template>
  <div id="app">
    <chaoshihead></chaoshihead>
    <keep-alive >
      <router-view v-if="$route.meta.keepAlive"/>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"/>
    <chaoshifoot></chaoshifoot>
  </div>
</template>
<script>
import chaoshihead from '@/components/head/head.vue'
import chaoshifoot from '@/components/foot/foot.vue'
export default {
  name:'App',
  components:{
    chaoshihead,chaoshifoot
  },
  data() {
    return {
      
    }
  },
  methods: {
   
  
  },
  computed:{

  },
  watch:{

  },
  beforeCreate(){
    // window.sessionStorage.setItem('customer',JSON.stringify({name:'wedfrg'}))
    // window.sessionStorage.setItem('account',JSON.stringify({name:'wedfrg'}))
    window.localStorage.setItem('customer',JSON.stringify({name:'wedfrg',id:'234546yuhrbdf',nickname:'v而额外付费'}))
    window.localStorage.setItem('account',JSON.stringify({name:'wedfrg',ip:'r4trgfdsasd'}))
    window.localStorage.setItem('remembercustomer',true)
      // 初始化和刷新页面时 判断用户是否登录并挂载到vuex中
    
     this.$store.dispatch('customer/refreshpage')
  },
  created() {
    
  },
}
</script>